package com.example.task;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class AsyncTask {

    @Async
    public void showMessage(String ip) throws InterruptedException {
        System.out.println("------运行显示信息------" + ip);
        showLog();
    }

    private void showLog(){
        System.out.println("======显示日志======");
    }

}
